package com.yykj.drup.server.service.feign;

import com.yykj.common.vo.ResultVO;
import com.yykj.drup.server.service.feign.fallback.PrescriptionServerFeignFallBack;
import com.yykj.prescription.client.dto.PrescriptionDetailDTO;
import com.yykj.prescription.client.dto.PrescriptionOrderCheckResultDTO;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @Author zeng
 * @Date 2022/3/17
 */
@Service
@FeignClient(name = "prescription-server", fallbackFactory = PrescriptionServerFeignFallBack.class)
public interface PrescriptionServerFeign {

    @GetMapping("/api/prescription/info/{prescriptionId}")
    ResultVO<PrescriptionDetailDTO> prescriptionInfo(@PathVariable String prescriptionId);

    @GetMapping("/api/prescription/client/order/check/{prescriptionId}")
    @ApiOperation("处方下单检查")
    ResultVO<PrescriptionOrderCheckResultDTO> checkPrescriptionOrder(@PathVariable String prescriptionId);
}
